package com.yixing.demo.service;

import com.yixing.demo.mapper.MessageMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MessageService {
    @Resource
    MessageMapper messageMapper;

    public String getSessionLastMessageBySessionId(Integer sessionId) {
        return messageMapper.getSessionLastMessageBySessionId(sessionId);
    }

    public List<String> getSessionHistoryMessageBySessionId(Integer sessionId) {
        return messageMapper.getSessionHistoryMessageBySessionId(sessionId);
    }
}
